﻿using Core.Tools.IOC;
using Hardware.Reactor.Base.Setting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UI.Application.Share.Config;

namespace UI.Application.Config.Services
{
    [ExposedService(Lifttime.Singleton,typeof(ISystemConfigProvider),typeof(IReactorConfigProvider))]
    public class SystemConfigProvider : ISystemConfigProvider, IReactorConfigProvider
    {
        private SystemConfigManager SystemConfigManager;
        public ReactorConfig ReactorConfig { get; private set; }

        public event Action<ReactorConfig> OnChanged;

        public SystemConfigProvider(SystemConfigManager systemConfigManager) 
        {
            SystemConfigManager = systemConfigManager;
            ReactorConfig = SystemConfigManager.Config.ReactorConfig;
        }

    }
}
